<template>
  <uni-nav-bar title="加注机列表" left-icon="left" @clickLeft="navBack" :fixed="true" statusBar></uni-nav-bar>
<!--  <scroll-view scroll-y="true" enable-back-to-top @scrolltolower="loadMore" class="scroll-box"
    :style="{ height: pageHeight + 'px' }"> -->
    <FillList @jump="jump" :fillList="keyList"></FillList>
  <!-- </scroll-view> -->
</template>

<script setup lang="ts">
  import { navBack, navTo } from '@/utils/navigator';
  import { ref } from 'vue';
  import { showLoading } from '@/utils/prompt';
  import FillList from '@c/administrator/List/fillList.vue';
  import { getFillList } from '@/gql/administrator';
  import { toPublish } from '@mqtt';
   import { onShow } from '@dcloudio/uni-app';
  // const pageHeight = ref();
  const keyList = ref([])
  // uni.getSystemInfo({
  //   success: function (res) {
  //     pageHeight.value = res.windowHeight - 50;
  //   },
  // });
  onShow(()=>{
    FillAll()
  })
  //加注机列表
  function FillAll() {
    showLoading('正在加载');
    const payload = {
      query: getFillList
    };
    toPublish('ql/control/getFillList', payload, (obj : any) => {
      uni.hideLoading();
      const { data } = obj;
      keyList.value = data.getFillList;
    });
  }
  function jump(num : number) {
    navTo('administrator/fillIng/fillDetail?id=' + num)
  }
</script>

<style scoped lang="less">
</style>